// 存放客户管理的接口
import request from '@/utils/request'

// 获取客户列表
export const getClientsList = params => request({
  url: '/clients',
  params
})

// 获取经纪列表
export const getAgentsList = () => request({
  url: '/agents'
})

// 新增客户
export const addClients = data => request({
  url: '/clients',
  method: 'post',
  data
})

// 根据id获取客户
export const getClientsDetail = id => request({
  url: '/clients/' + id
})

// 编辑客户
export const editClients = data => request({
  url: '/clients/' + data.id,
  method: 'put',
  data
})

// 删除客户
export const delClients = id => request({
  url: '/clients/' + id,
  method: 'delete'
})

// 获取客户数量
export const getClientsNumber = params => request({
  url: '/clients/count',
  params
})
